package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	MysqlInit
}
type MysqlInit struct {
	Hort string
	User string
	Pass string
	Part int
	Data string
}

var AppConf AppConfig

func AppInit() {
	viper.SetConfigFile("./appconfig/test.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConf)
	fmt.Println("动态配置连接成功", &AppConf)
}
